package com.smh.demo1.a10;

import com.smh.demo1.a10.service.MyService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author shiminghui
 * @date 2025/4/12 15:32
 * @description: TODO
 */
@SpringBootApplication
public class A10Application {
    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(A10Application.class, args);
        /**
         * 1.使用AspectJ进行编译阶段修改代码实现代理
         * 2.使用Agent在类加载阶段修改代码实现代理
         */

        MyService bean = context.getBean(MyService.class);
        bean.test();

        context.close();
    }
}
